package com.mall.application.api;

import com.mall.application.entity.param.ApplicationAddParam;
import com.mall.application.entity.param.ApplicationEditParam;
import com.mall.application.entity.vo.ApplicationVO;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @className: com.mall.application.api-> ApplicationApi
 * @description: 应用管理api
 * @author: wuyijie
 * @createDate: 2021/6/8 22:03
 */
public interface ApplicationApi {
    /**
     * todo: 添加
     *
     * @param applicationAddParam
     * @return:com.mall.application.module.vo.ApplicationVO
     * @Author: wuyijie
     * @Date: 2021/6/8 22:34
     */
    int add(@RequestBody ApplicationAddParam applicationAddParam);

    int deleteById(@RequestParam int id);

    int edit(@RequestBody ApplicationEditParam applicationEditParam);


    /**
     * TODO: 暂停使用
     *
     * @author wuyijie
     * @date 2021/6/12 15:57
     * @param id
     * @return int
     */
    int pause(@RequestParam int id);

    /**
     * todo:根据应用id进行查询
     *
     * @param id
     * @return:com.mall.application.module.vo.ApplicationVO
     * @Author: wuyijie
     * @Date: 2021/6/8 22:25
     */
    ApplicationVO queryById(@RequestParam("id") int id);

    /**
     * todo:根据应用name进行查询
     *
     * @param name
     * @return:com.mall.application.module.vo.ApplicationVO
     * @Author: wuyijie
     * @Date: 2021/6/8 22:25
     */
    ApplicationVO queryByName(@RequestParam("name") String name);

}
